package com.example.shoppingmall.dao;

import com.example.shoppingmall.pojo.MetState;
import com.example.shoppingmall.pojo.PayMethod;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PayMethodMapper {

    //多条件查询+分页
    public List<PayMethod> getMethod(@Param("method_name") String method_name, @Param("method_state") Integer method_state,
                                     @Param("pageNo") Integer pageNo, @Param("pageNum") Integer pageNum);

    //查询总条数
    public int total(@Param("method_name") String method_name, @Param("method_state") Integer method_state);

    //根据id查询详情
    public PayMethod getMet(@Param("method_id") Integer method_id);

    //修改
    public int updateMet(PayMethod payMethod);

    //查询状态List
    public List<MetState> staList();

    //查询支付名称
    public List<PayMethod> metList();

    public int updateMet2(PayMethod payMethod);

}
